package edu.sctu.zcy.month201506.day20150614.iotest;

import java.io.*;

/**
 * Created by user24 on 2015/6/15.
 */
public class InputStreamReaderTest {

    int c = 0;
    int a = 0;
    FileInputStream fileInputStream;



    public void inputTurnToReader(){

        try {
            fileInputStream = new FileInputStream("D:\\ZCY2\\zcy1.txt");
            InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);

            try {
                while ((c = inputStreamReader.read()) != -1){

//                    a += c;
                    System.out.println((char)c);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

    }
}
